﻿using AbpVnext_Module.Dto;
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace AbpVnext_Module.Iservice
{
    /// <summary>
    /// 业务模块切换数据库
    /// </summary>
    public interface ISysUserService : ICrudAppService<SysUserDto, // 结果出参 
                                                                SysUserPageResultDto,
                                                                Guid, //主键
                                                                SysUserPageDto, //查询入参
                                                                SysUserCreateDto,  //创建入参dto
                                                                SysUserUpdateDto //更新入参dto
                                                                 >
    {
        Task<ListResultDto<SysUserDto>> GetRolesAsync(Guid id);

        Task<ListResultDto<SysUserDto>> GetAssignableRolesAsync();

        Task UpdateRolesAsync(Guid id, SysUserUpdateDto input);

        Task<SysUserDto> FindByUsernameAsync(string userName);

        Task<SysUserDto> FindByEmailAsync(string email);
    }
}
